package com.example.springboot.controller;

import com.example.springboot.service.UserService;
import entity.CityChild;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/test")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/test",method = RequestMethod.GET)
    public String test(){

        return userService.test(7);

    }

    @RequestMapping(value = "/tes2")
    public void test2(){
         userService.test2();

    }

    @RequestMapping(value = "/test3")
    @ResponseBody
    public CityChild  test3(){
       CityChild cityChild= userService.test4();
       return cityChild;
    }


}
